package ai.plantdata.Behavior.mode.InterpreterPattern.interfaces.impl;

import ai.plantdata.Behavior.mode.InterpreterPattern.interfaces.Expression;

/**
 * @Author: WangHui
 * @Date: 2020/12/23 13:59
 * @Description:
 */
public class TerminalExpression implements Expression {
    private String data;

    public TerminalExpression(String data) {
        this.data = data;
    }

    @Override
    public boolean interpret(String context) {
        return context.contains(data);
    }
}
